package com.infovane.service.impl;

import java.util.List;

import com.infovane.dao.BaseDao;
import com.infovane.service.ArticleTypeService;

public class ArticleTypeServiceImpl implements ArticleTypeService{
	
	private BaseDao baseDao;
	
	
	
	
	public BaseDao getBaseDao() {
		return baseDao;
	}




	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}




	/**
	 * 保存资讯分类����
	 * @param object
	 * @return boolean
	 * */
	public boolean add(Object object) {
		
		return this.baseDao.save(object);
	}



	/**
	 * 获取资讯类型
	 * @return List
	 * */
	public List get() {
		String hql="from TArticleType";
		return this.baseDao.load(hql);
	}



	/**
	 * 删除资讯分类
	 * @param modelClass, id
	 * @return boolean
	 * */
	public boolean delete(Class modelClass,int id) {
		
		return this.baseDao.delete(modelClass, id);
	}



	/**
	 * 获取资讯分类对象
	 * @param modelClass, id
	 * @return Object
	 * */
	public Object get(Class modelClass,int id) {
		return this.baseDao.load(modelClass, id);
	}



	/**
	 * 更新资讯分类
	 * @param Object
	 * @return boolean
	 * */
	public boolean update(Object object) {
		return this.baseDao.update(object);
	}

}
